<!DOCTYPE html>
<%@page contentType="text/html" %>
<%@page pageEncoding="UTF-8" %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JD应用的首页</title>

    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>

    <script>
        function getSeckill() {
            $.ajax({
                url: 'http://taobao.edu:9444/seckill/8',
                type: 'GET',
                dataType: 'jsonp',
                success: function(data) {
                    // 处理返回的 JSON 数据
                    $('#result').text(JSON.stringify(data));
                }
            });
        }
    </script>
</head>
<body>

<h1>JD应用的首页</h1>

<button type="button" onclick="javascript:getSeckill();">获取taobao系统的秒杀数据</button>

<div>
    获取到的数据：<span id="result"></span>
</div>


</body>
</html>
